#include "app_message.h"
#include "log/log.h"
// app_common_test
int main(int argc, char const *argv[])
{
    // json转换字符数组
    char *json_str = "{\"conn_type\":1,\"id\":\"5858\",\"msg\":\"61626364\"}";
    char message_chars[100];
    int chars_len = app_message_jsonToChars(json_str, message_chars, 100);
    log_debug("message_chars:%c%c%c%.*s chars_len:%d\n", message_chars[0] + 48, message_chars[1] + 48, message_chars[2] + 48, chars_len - 3, &message_chars[3], chars_len);

    // 字符数组转换json
    char *message_json = app_message_charsToJson(message_chars, chars_len);

    log_debug("message_json:%s\n", message_json);

    return 0;
}
